:root {
  --bg: #0d0d14;
  --card: #13131f;
  --border: #1e1e30;
  --yellow: #f5c842;
  --blue: #4fa8ff;
  --green: #4dffb0;
  --pink: #ff6b9d;
  --purple: #b87aff;
  --text: #e8e8f0;
  --muted: #7070a0;
  --sidebar-w: 260px;
}

section {
  margin-left: auto;
  margin-right: auto;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,168,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,168,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ===== TOP NAV ===== */
nav.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(13,13,20,0.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border); padding: 0 24px;
  height: 56px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 15px; color: var(--yellow); text-decoration: none; white-space: nowrap; }
.nav-logo span { color: var(--muted); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); text-decoration: none; letter-spacing: 1px; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; background: none; border: 1px solid var(--border); border-radius: 8px; }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--muted); border-radius: 2px; }
@media (max-width: 900px) { .nav-links { display: none; } .hamburger { display: flex; } }

/* ===== LAYOUT ===== */
.layout { display: flex; padding-top: 56px; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed; top: 56px; left: 0; width: var(--sidebar-w);
  height: calc(100vh - 56px); overflow-y: auto;
  background: rgba(13,13,20,0.97); border-right: 1px solid var(--border);
  padding: 20px 0 40px; z-index: 100; transition: transform 0.3s ease;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sidebar-back { display: flex; align-items: center; gap: 8px; margin: 0 14px 16px; padding: 9px 14px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 10px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); text-decoration: none; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.sidebar-back:hover { border-color: var(--yellow); color: var(--yellow); background: rgba(245,200,66,0.06); }
.sidebar-back-arrow { font-size: 14px; }
.sidebar-divider { height: 1px; background: var(--border); margin: 10px 16px; }
.sidebar-section-label { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); padding: 0 16px; margin-bottom: 5px; margin-top: 16px; }
.sidebar-link { display: flex; align-items: center; gap: 9px; padding: 8px 16px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; transition: color 0.2s, background 0.2s, border-left-color 0.2s; }
.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,0.03); border-left-color: var(--border); }
.sidebar-link.active { color: var(--green); background: rgba(77,255,176,0.05); border-left-color: var(--green); }
.s-icon { font-size: 13px; width: 16px; text-align: center; flex-shrink: 0; }
.s-badge { margin-left: auto; font-size: 9px; padding: 1px 5px; border-radius: 8px; background: rgba(77,255,176,0.12); color: var(--green); }
.sidebar-overlay { display: none; position: fixed; inset: 0; top: 56px; background: rgba(0,0,0,0.6); z-index: 99; }
@media (max-width: 900px) { .sidebar { transform: translateX(-100%); } .sidebar.open { transform: translateX(0); } .sidebar-overlay.open { display: block; } }

/* ===== MAIN ===== */
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; position: relative; z-index: 1; }
@media (max-width: 900px) { .main { margin-left: 0; } }

/* ===== PROGRESS BAR ===== */
.progress-bar { position: fixed; top: 56px; left: var(--sidebar-w); right: 0; height: 2px; background: linear-gradient(90deg, var(--blue), var(--green), var(--purple)); transform-origin: left; transform: scaleX(0); z-index: 199; }
@media (max-width: 900px) { .progress-bar { left: 0; } }

/* ===== HERO ===== */
#hero { padding: 76px 48px 60px; max-width: 100%; text-align: center; }
#cta  { padding: 60px 48px 76px; max-width: 100%; text-align: center; }

.hero-badge { display: inline-block; background: rgba(79,168,255,0.1); border: 1px solid rgba(79,168,255,0.25); color: var(--blue); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; padding: 6px 16px; border-radius: 20px; margin-bottom: 22px; font-family: 'JetBrains Mono', monospace; animation: fadeDown 0.6s ease both; }
.hero-title { font-size: clamp(2.8rem, 8vw, 5rem); font-weight: 800; line-height: 1; background: linear-gradient(135deg, #4fa8ff 0%, #4dffb0 50%, #b87aff 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: fadeDown 0.6s ease 0.1s both; }
.hero-sub { font-size: 1rem; color: var(--muted); margin-top: 12px; font-family: 'JetBrains Mono', monospace; animation: fadeDown 0.6s ease 0.2s both; }
.hero-code { display: inline-block; margin-top: 30px; background: #080810; border: 1px solid var(--border); border-radius: 14px; padding: 20px 28px; font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 2; text-align: left; animation: fadeUp 0.6s ease 0.3s both; }
.hero-buttons { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; animation: fadeUp 0.6s ease 0.4s both; }
.btn { padding: 11px 22px; border-radius: 10px; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; border: none; display: inline-block; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #0d0d14; box-shadow: 0 4px 20px rgba(79,168,255,0.2); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

/* ===== SECTIONS ===== */
section { padding: 68px 48px; max-width: 820px; }
@media (max-width: 600px) { section { padding: 50px 20px; } #hero { padding: 56px 20px 44px; } #cta { padding: 44px 20px 60px; } }

.section-label { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); font-family: 'JetBrains Mono', monospace; margin-bottom: 10px; }
.section-heading { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; line-height: 1.15; margin-bottom: 12px; }
.section-desc { color: var(--muted); font-size: 14px; line-height: 1.75; max-width: 580px; margin-bottom: 24px; }

.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 0 48px; }
@media (max-width: 600px) { .divider { margin: 0 20px; } }

.cta-box { background: linear-gradient(135deg, rgba(79,168,255,0.07), rgba(77,255,176,0.07)); border: 1px solid rgba(79,168,255,0.18); border-radius: 20px; padding: 50px 36px; max-width: 560px; margin: 0 auto; }
.cta-title { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: 12px; background: linear-gradient(135deg, var(--blue), var(--green)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.cta-text { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 22px; }

footer { border-top: 1px solid var(--border); padding: 22px 48px; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); position: relative; z-index: 1; }
footer span { color: var(--blue); }

.fade-in { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Code header */
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  background: #0a0a15; border: 1px solid var(--border);
  border-bottom: none; border-radius: 12px 12px 0 0;
  padding: 10px 18px;
}
.code-header + .code-block { border-radius: 0 0 12px 12px; }
.code-dots { display: flex; gap: 6px; }
.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-filename { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }

/* Syntax colors */
.kw { color: var(--pink); font-weight: 700; }
.fn { color: var(--yellow); font-weight: 700; }
.str { color: var(--green); }
.var { color: var(--text); }
.op { color: var(--muted); }
.paren { color: var(--muted); }
.param { color: var(--blue); }
.cmt { color: #404060; font-style: italic; }
.line { display: block; }

.code-block {
  background: #080810; border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 24px; font-family: 'JetBrains Mono', monospace;
  font-size: 13px; line-height: 1.9; overflow-x: auto;
}

/* Legacy container */
.container { max-width: 820px; }

h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #4fa8ff 0%, #4dffb0 50%, #b87aff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--muted);
  margin-top: 10px;
  font-size: 1rem;
  font-family: 'JetBrains Mono', monospace;
}

/* SECTION LABELS */
.section-title {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 8px;
}

/* STEP CARDS */
.step-card {
  background: var(--card);
  border: 1px solid var(--accent-border, var(--border));
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
  animation: fadeUp 0.6s ease both;
  transition: border-color 0.2s;
}

.step-card:nth-child(1) { animation-delay: 0.1s; }
.step-card:nth-child(2) { animation-delay: 0.2s; }
.step-card:nth-child(3) { animation-delay: 0.3s; }
.step-card:nth-child(4) { animation-delay: 0.4s; }
.step-card:nth-child(5) { animation-delay: 0.5s; }

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}

.step-body {
  padding-left: 52px;
}

@media (max-width: 600px) {
  .step-body { padding-left: 0; }
  .step-header { flex-direction: column; gap: 10px; }
}

.step-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.highlight {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

/* OS GRID */
.os-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 500px) { .os-grid { grid-template-columns: 1fr; } }

.os-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
  cursor: default;
}

.os-card.active {
  border-color: rgba(245,200,66,0.4);
  background: rgba(245,200,66,0.05);
}

.os-icon { font-size: 28px; margin-bottom: 8px; }
.os-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.os-file { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }

/* TIP BOX */
.tip-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.tip-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* CHECKLIST */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.check-box.checked {
  background: rgba(77,255,176,0.15);
  border-color: var(--green);
  color: var(--green);
}

.check-title { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.check-desc { font-size: 12px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }

/* INSTRUCTION STEPS */
.instruction-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.inst-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.inst-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  flex-shrink: 0;
}

.inst-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  padding-top: 4px;
}

/* KBD / MONO */
.kbd {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 5px;
  padding: 1px 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text);
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.btn-inline {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(77,255,176,0.15);
  border: 1px solid rgba(77,255,176,0.4);
  border-radius: 6px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--green);
}

/* EXTENSION CARD */
.ext-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(77,255,176,0.25);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.ext-icon { font-size: 32px; flex-shrink: 0; }
.ext-info { flex: 1; }
.ext-name { font-weight: 800; font-size: 16px; margin-bottom: 3px; }
.ext-author { font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--muted); margin-bottom: 5px; }
.ext-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.ext-badge {
  background: rgba(77,255,176,0.15);
  border: 1px solid rgba(77,255,176,0.35);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

/* EXTRAS GRID */
.extras-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 500px) { .extras-grid { grid-template-columns: 1fr; } }

.extra-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.extra-icon { font-size: 18px; flex-shrink: 0; }
.extra-name { font-weight: 700; font-size: 13px; margin-bottom: 3px; }
.extra-desc { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* CODE BLOCK */
.code-block {
  background: #080810;
  border-radius: 12px;
  padding: 20px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 2;
  margin-bottom: 16px;
}

.code-line { display: flex; align-items: center; }

.kw    { color: var(--pink);   font-weight: 700; }
.fn    { color: var(--yellow); font-weight: 700; }
.paren { color: var(--muted); }
.param { color: var(--blue); }
.op    { color: var(--muted); }
.str   { color: var(--green); }
.var   { color: var(--text); }

/* TERMINAL */
.terminal-box {
  background: #06060e;
  border: 1px solid rgba(77,255,176,0.2);
  border-radius: 12px;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.terminal-header {
  background: rgba(255,255,255,0.05);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-title {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-left: 4px;
}

.terminal-body {
  padding: 16px 20px;
  line-height: 1.9;
}

.t-prompt { color: var(--green); margin-right: 8px; }
.t-output { color: var(--text); }
.t-cursor {
  display: inline-block;
  color: var(--green);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* SUMMARY / SHORTCUTS */
.summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
  animation: fadeUp 0.6s ease 0.6s both;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 600px) { .shortcuts-grid { grid-template-columns: 1fr 1fr; } }

.shortcut {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.shortcut-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-bottom: 8px;
}

.shortcut-label {
  font-size: 11px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

/* RULE CARD */
.rule-card {
  background: linear-gradient(135deg, rgba(79,168,255,0.08), rgba(77,255,176,0.08));
  border: 1px solid rgba(79,168,255,0.25);
  border-radius: 14px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: fadeUp 0.6s ease 0.7s both;
  margin-bottom: 32px;
}

.rule-icon { font-size: 28px; flex-shrink: 0; }
.rule-text { font-size: 15px; line-height: 1.5; }
.rule-text strong { color: var(--blue); }

/* FOOTER */
.section-footer {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  justify-content: center;
  align-items: center;
  display: flex;
  margin-top: 1rem;
  padding-bottom: 2rem;
}

/* ANIMATIONS */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}